import req from '../http';

//校验电话号码是否唯一
export function checkPhoneNumUnique(datas) {
    return req({
        url: "/customer/api/tbClient/selectUsername/" + datas.phone,
        method: "get",
    })
}

//register页面携带手机号获取验证码
export function getCode(datas) {
    return req({
        url: "/Util/SMSVer/",
        method: "get",
    })
}


// 注册register
export function register(datas) {
    console.log(datas)
    return req({
        url: '/customer/api/tbClient/insertOneUser/'+datas.phoneNum+'/'+datas.password, method: 'post',
    })
}
// 登录
export function login(datas) {
    return req({
        url: '/login/account/' + datas.phoneNum + '/' + datas.password,
        method: 'get',
    })
}

// 找回密码
export function backPwd(datas) {
    console.log(datas)
    return req({
        url: '/customer/api/tbClient/updateOneUser/'+datas.phoneNum+'/'+datas.password,method: 'post',
    })

}
